package davelha.common;

import java.rmi.Remote;
import java.rmi.RemoteException;

public interface BaseGameInterface extends Remote{
	
	public static final int STATE_BEGINING = 0;
	public static final int STATE_WAITING_PLAYER = 1;
	public static final int STATE_WAITING_PLAYER_ONE_CONFIRMATION = 2;
	public static final int STATE_GAME_START = 3;
	public static final int STATE_GAME_PLAYER_ONE_TURN = 4;
	public static final int STATE_GAME_PLAYER_TWO_TURN = 5;
	public static final int STATE_GAME_PLAYER_ONE_WIN = 6;
	public static final int STATE_GAME_PLAYER_TWO_WIN = 7;
	public static final int STATE_GAME_FINISHED = 10;
	
	/**
	 * 
	 * @return Player o jogador da partida
	 * @throws RemoteException
	 */
	public Player getPlayer1() throws RemoteException;

	/**
	 * 
	 * @return
	 * @throws RemoteException
	 */
	public Player getPlayer2() throws RemoteException;

	public String getGameName() throws RemoteException;

	public int getGameState() throws RemoteException;

	public int getGameId() throws RemoteException;
	
	public boolean setChar(int pos, char input) throws RemoteException;
	
	public void setGameState(int gameState) throws RemoteException;
	
	public char[] getGameTab() throws RemoteException;
	
	public boolean gameOver() throws RemoteException;
	
}
